<?

include_once "constants.php";
include_once "DB.php";

function echoDocs($uid) {
	$query = "CALL sp_FindDocumentsByOwnerID($uid);";
	$db = new DB();
	$db->query($query);
	$count = 0;
	$rows = $db->rows();
	while ($row = $db->nextRow()) {
		$title = $row['Title'];
		$owner = $row['OwnerName'];
		$line = "<tr>\n<td>$title</td>\n<td>$owner</td>\n<td> </td>\n<td> </td>\n</tr>\n";
		echo $line;
		$count++;
	}
	echo "count: $count, uid: $uid, rows: $rows";
	$db->close();
}

?>
